#############################################################################
# Makefile for building: ../drvAutogenQt
# Project:  drvAutogenQt.pro
#  QPATH = yourt path to Qt installation folder
#############################################################################

####### Compiler, tools and options

QPATH	      = /home/leo/qtsdk-2010.02/qt
CC            = gcc
CXX           = g++
DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH       = -I$(QPATH)/mkspecs/linux-g++ -I. -I$(QPATH)/include/QtCore -I$(QPATH)/include/QtGui -I$(QPATH)/include -I.
LINK          = g++
LFLAGS        = -Wl,-O1 -Wl,-rpath,./lib,-rpath,./drvautogen/lib
LIBS          = $(SUBLIBS)  -L$(QPATH)/lib -lQtGui -L/home/leo/qtsdk-2010.02/qt/lib -L/usr/X11R6/lib -lQtCore -lpthread 
AR            = ar cqs
RANLIB        = 
QMAKE         = $(QPATH)/bin/qmake
TAR           = tar -cf
COMPRESS      = gzip -9f
COPY          = cp -f
SED           = sed
COPY_FILE     = $(COPY)
COPY_DIR      = $(COPY) -r
STRIP         = strip
INSTALL_FILE  = install -m 644 -p
INSTALL_DIR   = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE      = rm -f
SYMLINK       = ln -f -s
DEL_DIR       = rmdir
MOVE          = mv -f
CHK_DIR_EXISTS= test -d
MKDIR         = mkdir -p

####### Output directory

OBJECTS_DIR   = ./

####### Files

SOURCES       = main.cpp \
		mainwindow.cpp \
		dialog.cpp \
		renderarea.cpp \
		testDialog.cpp moc_mainwindow.cpp \
		moc_dialog.cpp \
		moc_group.cpp \
		moc_register.cpp \
		moc_renderarea.cpp \
		moc_testDialog.cpp
OBJECTS       = main.o \
		mainwindow.o \
		dialog.o \
		renderarea.o \
		testDialog.o \
		moc_mainwindow.o \
		moc_dialog.o \
		moc_group.o \
		moc_register.o \
		moc_renderarea.o \
		moc_testDialog.o
DIST          = $(QPATH)/mkspecs/common/g++.conf \
		$(QPATH)/mkspecs/common/unix.conf \
		$(QPATH)/mkspecs/common/linux.conf \
		$(QPATH)/mkspecs/qconfig.pri \
		$(QPATH)/mkspecs/features/qt_functions.prf \
		$(QPATH)/mkspecs/features/qt_config.prf \
		$(QPATH)/mkspecs/features/exclusive_builds.prf \
		$(QPATH)/mkspecs/features/default_pre.prf \
		$(QPATH)/mkspecs/features/release.prf \
		$(QPATH)/mkspecs/features/default_post.prf \
		$(QPATH)/mkspecs/features/warn_on.prf \
		$(QPATH)/mkspecs/features/qt.prf \
		$(QPATH)/mkspecs/features/unix/thread.prf \
		$(QPATH)/mkspecs/features/moc.prf \
		$(QPATH)/mkspecs/features/resources.prf \
		$(QPATH)/mkspecs/features/uic.prf \
		$(QPATH)/mkspecs/features/yacc.prf \
		$(QPATH)/mkspecs/features/lex.prf \
		$(QPATH)/mkspecs/features/include_source_dir.prf \
		drvAutogenQt.pro
QMAKE_TARGET  = drvAutogenQt
DESTDIR       = ../
TARGET        = ../drvAutogenQt

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: Makefile $(TARGET)

$(TARGET):  $(OBJECTS)  
	@$(CHK_DIR_EXISTS) ../ || $(MKDIR) ../ 
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: drvAutogenQt.pro  $(QPATH)/mkspecs/linux-g++/qmake.conf $(QPATH)/mkspecs/common/g++.conf \
		$(QPATH)/mkspecs/common/unix.conf \
		$(QPATH)/mkspecs/common/linux.conf \
		$(QPATH)/mkspecs/qconfig.pri \
		$(QPATH)/mkspecs/features/qt_functions.prf \
		$(QPATH)/mkspecs/features/qt_config.prf \
		$(QPATH)/mkspecs/features/exclusive_builds.prf \
		$(QPATH)/mkspecs/features/default_pre.prf \
		$(QPATH)/mkspecs/features/release.prf \
		$(QPATH)/mkspecs/features/default_post.prf \
		$(QPATH)/mkspecs/features/warn_on.prf \
		$(QPATH)/mkspecs/features/qt.prf \
		$(QPATH)/mkspecs/features/unix/thread.prf \
		$(QPATH)/mkspecs/features/moc.prf \
		$(QPATH)/mkspecs/features/resources.prf \
		$(QPATH)/mkspecs/features/uic.prf \
		$(QPATH)/mkspecs/features/yacc.prf \
		$(QPATH)/mkspecs/features/lex.prf \
		$(QPATH)/mkspecs/features/include_source_dir.prf \
		/home/leo/qtsdk-2010.02/qt/lib/libQtGui.prl \
		/home/leo/qtsdk-2010.02/qt/lib/libQtCore.prl
	$(QMAKE) -spec $(QPATH)/mkspecs/linux-g++ -unix -o Makefile drvAutogenQt.pro
$(QPATH)/mkspecs/common/g++.conf:
$(QPATH)/mkspecs/common/unix.conf:
$(QPATH)/mkspecs/common/linux.conf:
$(QPATH)/mkspecs/qconfig.pri:
$(QPATH)/mkspecs/features/qt_functions.prf:
$(QPATH)/mkspecs/features/qt_config.prf:
$(QPATH)/mkspecs/features/exclusive_builds.prf:
$(QPATH)/mkspecs/features/default_pre.prf:
$(QPATH)/mkspecs/features/release.prf:
$(QPATH)/mkspecs/features/default_post.prf:
$(QPATH)/mkspecs/features/warn_on.prf:
$(QPATH)/mkspecs/features/qt.prf:
$(QPATH)/mkspecs/features/unix/thread.prf:
$(QPATH)/mkspecs/features/moc.prf:
$(QPATH)/mkspecs/features/resources.prf:
$(QPATH)/mkspecs/features/uic.prf:
$(QPATH)/mkspecs/features/yacc.prf:
$(QPATH)/mkspecs/features/lex.prf:
$(QPATH)/mkspecs/features/include_source_dir.prf:
/home/leo/qtsdk-2010.02/qt/lib/libQtGui.prl:
/home/leo/qtsdk-2010.02/qt/lib/libQtCore.prl:
qmake:  FORCE
	@$(QMAKE) -spec $(QPATH)/mkspecs/linux-g++ -unix -o Makefile drvAutogenQt.pro

dist: 
	@$(CHK_DIR_EXISTS) .tmp/drvAutogenQt1.0.0 || $(MKDIR) .tmp/drvAutogenQt1.0.0 
	$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/drvAutogenQt1.0.0/ && $(COPY_FILE) --parents mainwindow.h dialog.h group.h register.h renderarea.h testDialog.h .tmp/drvAutogenQt1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp dialog.cpp renderarea.cpp testDialog.cpp .tmp/drvAutogenQt1.0.0/ && (cd `dirname .tmp/drvAutogenQt1.0.0` && $(TAR) drvAutogenQt1.0.0.tar drvAutogenQt1.0.0 && $(COMPRESS) drvAutogenQt1.0.0.tar) && $(MOVE) `dirname .tmp/drvAutogenQt1.0.0`/drvAutogenQt1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/drvAutogenQt1.0.0


clean:compiler_clean 
	-$(DEL_FILE) $(OBJECTS)
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
	-$(DEL_FILE) $(TARGET) 
	-$(DEL_FILE) Makefile


mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc_mainwindow.cpp moc_dialog.cpp moc_group.cpp moc_register.cpp moc_renderarea.cpp moc_testDialog.cpp
compiler_moc_header_clean:
	-$(DEL_FILE) moc_mainwindow.cpp moc_dialog.cpp moc_group.cpp moc_register.cpp moc_renderarea.cpp moc_testDialog.cpp
moc_mainwindow.cpp: mainwindow.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp

moc_dialog.cpp: dialog.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) dialog.h -o moc_dialog.cpp

moc_group.cpp: group.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) group.h -o moc_group.cpp

moc_register.cpp: register.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) register.h -o moc_register.cpp

moc_renderarea.cpp: register.h \
		group.h \
		renderarea.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) renderarea.h -o moc_renderarea.cpp

moc_testDialog.cpp: testDialog.h
	/home/leo/qtsdk-2010.02/qt/bin/moc $(DEFINES) $(INCPATH) testDialog.h -o moc_testDialog.cpp

compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
	-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean 

####### Compile

main.o: main.cpp mainwindow.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp

mainwindow.o: mainwindow.cpp mainwindow.h \
		dialog.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp

dialog.o: dialog.cpp renderarea.h \
		register.h \
		group.h \
		dialog.h \
		mainwindow.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o dialog.cpp

renderarea.o: renderarea.cpp renderarea.h \
		register.h \
		group.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o renderarea.o renderarea.cpp

testDialog.o: testDialog.cpp renderarea.h \
		register.h \
		group.h \
		dialog.h \
		mainwindow.h
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o testDialog.o testDialog.cpp

moc_mainwindow.o: moc_mainwindow.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp

moc_dialog.o: moc_dialog.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dialog.o moc_dialog.cpp

moc_group.o: moc_group.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_group.o moc_group.cpp

moc_register.o: moc_register.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_register.o moc_register.cpp

moc_renderarea.o: moc_renderarea.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_renderarea.o moc_renderarea.cpp

moc_testDialog.o: moc_testDialog.cpp 
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_testDialog.o moc_testDialog.cpp

####### Install

install:   FORCE

uninstall:   FORCE

FORCE:

